<script setup lang="ts">
import { reactive, inject, onMounted } from 'vue'
import mySetting from '../components/SettingItem.vue'
import { setClientSettingApi } from '../api/index'
import { setWinSizeKey, setSearchTagKey } from '../model/type'
const handleWinSize = inject(setWinSizeKey)
const setTag = inject(setSearchTagKey)
onMounted(() => {
    setTag!('我的设置')
    handleWinSize!()
})
//const active = ref(false)
const settings = reactive({
    'callSet': true
})
const setSetting = async () => {
    // const res = await setClientSettingApi(settings)
    //message.info('设置成功')

}



</script>
<template>
    <n-card style="width: 500px;">
        <n-space vertical>
            <mySetting label="按键设置" v-model:value="settings.callSet" @update:value="setSetting"></mySetting>
            <mySetting label="按键设置" v-model:value="settings.callSet" @update:value="setSetting"></mySetting>
            <mySetting label="按键设置" v-model:value="settings.callSet" @update:value="setSetting"></mySetting>
        </n-space>
    </n-card>
</template>
<style scoped></style>